package com.dingwei.lesyndrome.ui.activity;

import android.os.Bundle;
import android.widget.EditText;

import com.allen.library.SuperButton;
import com.dingwei.lesyndrome.R;
import com.dingwei.lesyndrome.mvp.presenter.FeedBackPresenter;
import com.dingwei.lesyndrome.mvp.view.Contract;
import com.lihao.baselibrary.base.BaseActivity;
import com.lihao.baselibrary.weight.TitleBar;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created time 2018/3/9.
 * Creator 南柯一梦丶 on
 * Personal signature 余生还长 何必慌张
 * Page description :
 */

public class FeedbackActivity extends BaseActivity implements Contract.FeedbackView {

    FeedBackPresenter feedBackPresenter = new FeedBackPresenter(this);
    @Bind(R.id.title_bar)
    TitleBar titleBar;
    @Bind(R.id.et_content)
    EditText etContent;
    @Bind(R.id.btn_submit)
    SuperButton btnSubmit;

    @Override
    protected int getContentViewId() {
        return R.layout.activity_feedback;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {

    }

    @Override
    public void submitSuccess() {
        finish();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick(R.id.btn_submit)
    public void onViewClicked() {
        feedBackPresenter.feedback(etContent.getText().toString());
    }
}
